package com.example.demo.controller;


import com.example.demo.service.HistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.util.ArrayList;
import java.util.List;

/**
 * 功能描述：
 *
 * @Author: Zhanghf
 * @Date: 2021/5/30 11:13
 */
@RestController
public class HistoryController {

    @Autowired(required = false)
private HistoryService historyService;

    @GetMapping("/updatehistory")
    public void updatehistory(Integer userid, Integer bookid, Integer chapterid) {
        historyService.AysncHistoryUpdate(userid, bookid, chapterid);
    }



    @GetMapping("/deletehistory")
    public void deletehistory(Integer userid, Integer bookid, Integer chapterid)
    {

      historyService.AysncHistoryDelete(userid, bookid, chapterid);
    }
}
